package com.neusoft.wenXinYiYan.controller;

import com.neusoft.wenXinYiYan.domain.Responce;
import com.neusoft.wenXinYiYan.service.impl.AiService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/WX")
public class AiController {

    @Autowired
    AiService aiService;

    @GetMapping("/answer")
    public AjaxResult answer(String question) {

        Responce responce = aiService.answer(question);
        return AjaxResult.success(responce);
    }
}

//http://localhost:8082/img/2024/02/28/aaaa_20240228203127A001.jpg
